var layerId;
$(function(){
	$("#addTopic-button").click(function(){
		layerId=layer.open({
			title: "添加常见问题",
			area: ['1200px','700px'],
			fix:true,
			type: 2,
			content: basePath+'/question/add.shtml'
		});
	})
})

function closeLayer(flag){
	layer.close(layerId);
	if(flag>0){
		self.location.reload(true); 
	}
}
function editFun(questionId){
	layerId=layer.open({
		title: "修改常见问题",
		area: ['1200px','700px'],
		fix:true,
		type: 2,
		content: basePath+'/question/edit.shtml?questionId='+questionId
	});
}
function deleteFun(questionId){
	if(confirm("确认删除？")){
		 $.ajax({
	  		 url:basePath+"/question/delete.shtml?questionId="+questionId,  
	  		 type:"post",
	  		 dataType:"JSON",
	  		 success:ajaxSuccessRefreshFun
	  	 });
	}
}
function updateStatus(questionId){
	$.ajax({
		url:basePath+"/question/updateStatus.shtml?questionId="+questionId,  
		type:"post",
		dataType:"JSON",
		success:ajaxSuccessRefreshFun
	});
}
